package com.tcgroup.phone.base_core.widget.factory;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;

import androidx.databinding.DataBindingUtil;

import com.tcgroup.phone.base_core.BR;
import com.tcgroup.phone.base_core.R;
import com.tcgroup.phone.base_core.databinding.CoreWidgetLayoutRbBinding;
import com.tcgroup.phone.base_core.widget.model.SmartRadioGroupModel;

/**
 * 作者: wangfei
 * 创建时期: 2020/4/23.
 * 包名: com.tcgroup.phone.base_core.widget.factory
 * 类名: OSAndroidMvvm
 */
public class AbRadioGroupViewFactory  {

    CoreWidgetLayoutRbBinding binding;

    public View inflateView(Context context, SmartRadioGroupModel model) {
        binding = DataBindingUtil.inflate(LayoutInflater.from(context), R.layout.core_widget_layout_rb,null,false);
        binding.setVariable(BR.model,model);
        binding.getRoot().setTag(model);
        return binding.getRoot();
    }
}
